﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserRegistration.ascx.cs" Inherits="QTMusic.UserControls.UserRegistration" %>

<asp:Panel ID="Registform" runat="server" CssClass="regist_form">
    <asp:Table runat="server" Width="100%">
        <asp:TableRow>
            <asp:TableCell ColumnSpan="3"  HorizontalAlign="Center">
                <span class="title_font">Join us now!</span> 
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell HorizontalAlign="left"  Width="50px">Username</asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="InputUsername" runat="server" TextMode="SingleLine"  Width="180px"></asp:TextBox>
            </asp:TableCell>
            <asp:TableCell>
                <asp:CustomValidator ID="ValidateUsername" runat="server" 
                                    ValidateEmptyText="true" 
                                    OnServerValidate="vld_username" 
                                    ControlToValidate="InputUsername"></asp:CustomValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell HorizontalAlign="left">Password</asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="InputPassword" runat="server" TextMode="Password" EnableViewState="true" Width="180px"></asp:TextBox>
            </asp:TableCell>
            <asp:TableCell></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell HorizontalAlign="left">Re-enter</asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="InputReenterPassword" runat="server" TextMode="Password" EnableViewState="true" Width="180px"></asp:TextBox>
            </asp:TableCell>
            <asp:TableCell>
                <asp:CompareValidator ID="Validate2Password" runat="server" 
                                    ErrorMessage="Not match!" 
                                    ControlToCompare="InputPassword" 
                                    ControlToValidate="InputReenterPassword"></asp:CompareValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell HorizontalAlign="left">Email</asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="InputEmail" runat="server" TextMode="SingleLine" EnableViewState="true" Width="180px"></asp:TextBox>
            </asp:TableCell>
            <asp:TableCell>
                <asp:RegularExpressionValidator ID="ValidateEmail" runat="server" 
                                            ErrorMessage="Invalid email!" 
                                            ControlToValidate="InputEmail" 
                                            ValidationExpression="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$"></asp:RegularExpressionValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell HorizontalAlign="left" VerticalAlign="top">Birth</asp:TableCell>
            <asp:TableCell ColumnSpan="2">
                
                <asp:TextBox ID="InputDob" runat="server" TextMode="SingleLine" EnableViewState="true" ReadOnly="true" Width="180px"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="InputDob_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="InputDob" PopupButtonID="BtnPopupCalendar" Format="dd/MM/yyyy">
                </ajaxToolkit:CalendarExtender>
                <asp:ImageButton ID="BtnPopupCalendar" runat="server" ImageUrl="~/Resources/WebImages/Calendar_scheduleHS.png" />
            </asp:TableCell>         
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                
            </asp:TableCell>
            <asp:TableCell HorizontalAlign="center">
                <asp:Button ID="SubmitUserInfo" runat="server" Text="Register" OnClick="RegistUserHandler" CssClass="button_modded"/>
            </asp:TableCell>
            <asp:TableCell>
                <asp:Label ID="ServerResponse" runat="server"  EnableViewState="false"></asp:Label>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
</asp:Panel>
